package com.iespring.mapper.app;

import com.iespring.bean.app.collect.bo.AddOrDeleteBo;
import com.iespring.bean.app.collect.po.MallCollect;
import com.iespring.bean.app.collect.vo.CollectListVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WxCollectMapper {

    // 查询收藏商品
    List<CollectListVo> getCollectList(@Param("type") int type);

    // 判断商品收藏状态
    MallCollect isCollected(AddOrDeleteBo addOrDeleteBo);

    // 商品未存在collect表中 --> 添加收藏
    void addNewCollect(MallCollect mallCollect);

    // 判断商品是否被逻辑删除
    boolean isDeleted(AddOrDeleteBo addOrDeleteBo);

    // 是 --> 添加收藏
    void addCollect(AddOrDeleteBo addOrDeleteBo);

    // 不是 --> 取消收藏
    void deleteCollect(AddOrDeleteBo addOrDeleteBo);

}
